package com.work.rcj.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.work.rcj.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author rcj
 * @since 2022-02-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_old_people")
public class OldPeople extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 老年人姓名
     */
    private String name;

    /**
     * 老年人身份证
     */
    @TableField("id_card")
    private String idCard;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 性别
     */
    private String sex;

    /**
     * 进入养老院原因
     */
    private String reason;

    /**
     * 病情
     */
    @TableField("illness")
    private String illness;

    /**
     * 床位ie
     */
    private Integer bedNo;

    /**
     * 老年人分类id
     */
    @TableField("type_id")
    private Integer typeId;

    /**
     * 医疗设备id
     */
    @TableField("medical_id")
    private Integer medicalId;

    /**
     * 护工id
     */
    @TableField("worker_id")
    private Integer workerId;




    /**
     * 创建时间
     */
    @TableField("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 0 未删除 1 删除
     */
    @TableField("deleted")
    private String deleted;


}
